CC= g++
LIBS= -lSDL_image -lSDL -lSDL_ttf -lpthread
LTEST= `sdl-config --libs`

all: servidor cliente

cliente: cliente.cpp pantalla.o sockets.o
	$(CC) cliente.cpp -o cli pantalla.o sockets.o $(LIBS) -g
	
servidor: server.o sockets.o tateti.o
	$(CC) server.o sockets.o tateti.o -o srv $(LIBS) -g

server.o: server.cpp 
	$(CC) -c server.cpp $(LIBS) -g

pantalla.o: include/sdl/pantalla.cpp
	$(CC) -c include/sdl/pantalla.cpp $(LIBS)

sockets.o: include/sockets/sockets.cpp
	$(CC) -c include/sockets/sockets.cpp -lpthread

tateti.o: include/s_func/tateti.cpp
	$(CC) -c include/s_func/tateti.cpp

clean:
	rm *.o cli srv
